textview: Use correct size for cairo node bounds
authorTimm Bäder <mail@baedert.org>
Sat, 1 Jul 2017 06:47:51 +0000 (08:47 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 20 Jul 2017 01:27:15 +0000 (21:27 -0400)
gtk/gtktextview.c

index da85d627c97744ab1e1b24377169e1ea1f8cbfab..5c2ee26ee5600c2d48be3ca203ac91ca22186dbf 100644 (file)
@@ -5905,11 +5905,12 @@ gtk_text_view_snapshot (GtkWidget   *widget,
   GtkStyleContext *context;
   graphene_rect_t bounds;
   cairo_t *cr;
+  int width, height;
 
+  gtk_widget_get_content_size (widget, &width, &height);
   graphene_rect_init (&bounds,
                       0, 0,
-                      gtk_widget_get_allocated_width (widget),
-                      gtk_widget_get_allocated_height (widget));
+                      width, height);
 
   cr = gtk_snapshot_append_cairo (snapshot, &bounds, "GtkTextView");